import { useDispatch } from 'react-redux'
import { bindActionCreators } from '@reduxjs/toolkit'
import { authActions } from '../slice/auth.slice'
import { tmpActions } from '../slice/tmp.slice'
import { modalActions } from '../slice/modal.slice'
import { employeesActions } from '../slice/employees.slice'
import { projectsActions } from '../slice/projects.slice'
import { projectEmployeeLinksActions } from '../slice/projectEmployeeLinks.slice'
import { projectManagersActions } from '../slice/projectManagers.slice'

const actions = {
  ...authActions,
  ...tmpActions,
  ...modalActions,
  ...employeesActions,
  ...projectsActions,
  ...projectEmployeeLinksActions,
  ...projectManagersActions
}
export const useActions = () => {
  const dispatch = useDispatch()
  return bindActionCreators(actions, dispatch)
}
